package org.jsola.contract.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.contract.example.ContractCredentialSiteExample.E_CONTRACT_CREDENTIAL_ID;
import static org.jsola.contract.example.ContractCredentialSiteExample.E_COST;
import static org.jsola.contract.example.ContractCredentialSiteExample.M_CONTRACT_CREDENTIAL_ID_MAX;
import static org.jsola.contract.example.ContractCredentialSiteExample.M_CONTRACT_CREDENTIAL_ID_NOT_NULL;
import static org.jsola.contract.example.ContractCredentialSiteExample.M_COST_MAX;
import static org.jsola.contract.example.ContractCredentialSiteExample.N_CONTRACT_CREDENTIAL_ID;
import static org.jsola.contract.example.ContractCredentialSiteExample.N_COST;
import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;

/**
 * 租户开通的电子合同账号
 *
 * @author JanusMix
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【租户开通的电子合同账号】的参数")
@Data
public class ContractCredentialSiteUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private Long id;

    @ApiModelProperty(notes = N_CONTRACT_CREDENTIAL_ID, example = E_CONTRACT_CREDENTIAL_ID, required = true)
    @NotNull(message = M_CONTRACT_CREDENTIAL_ID_NOT_NULL)
    @Length(max = 32, message = M_CONTRACT_CREDENTIAL_ID_MAX)
    private String contractCredentialId;

    @ApiModelProperty(notes = N_COST, example = E_COST)
    @Length(max = 255, message = M_COST_MAX)
    private String cost;


}

